Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@smui/ripple
Advanced tools
Ripples are an interaction feedback mechanism.
See MDC Ripple for more information on API and Sass mixins.
See the Sass variable file for styling variables.
npm install --save-dev @smui/ripple
<script>
import Ripple from '@smui/ripple';
let rippleClasses = [];
</script>
If you don't have a `class` attribute:
<p use:Ripple={{ripple: true, color: 'surface'}} tabindex="0">
Here is an element with a ripple.
</p>
If you do have a `class` attribute:
<p
class="some-class {rippleClasses.join(' ')}"
use:Ripple={{
ripple: true,
color: 'surface',
classForward: classes => rippleClasses = classes
}}
tabindex="0"
>
Here is an element with a ripple.
</p>
in action: https://sveltematerialui.com/demo/ripple
demo code: https://github.com/hperrin/svelte-material-ui/blob/master/site/src/routes/demo/ripple.svelte
A ripple Svelte action.
The action accepts an array, with two entries. The first is a boolean, whether the ripple is enabled. The second is an object with the props:
ripple
- Whether to enable the ripple.unbounded
- Whether the ripple is unbounded.disabled
- Whether the element is disabled.color
- The ripple color. ('surface', 'primary', or 'secondary')classForward
- A function that receives an array of classes. This is used to work around Svelte removing ripple classes in certain scenarios.FAQs
Svelte Material UI - Ripple
We found that @smui/ripple demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.